<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script type="module">
	// 如果then函数省略了成功回调，成功回调默认为value=>value
	// 如果then函数省略了失败回调，失败回调默认为reason=>{throw reason;}
	import Promise from "./index.js";
	const p = new Promise(function(resolve,reject){
		// resolve(100);
		reject(90);
	});
	const p1 = p.then();
	// 以上代码相当于
	// const p1 = p.then(value=>value,reason=>{
	// 	throw reason;
	// })
	console.log(p1);// rejected,90
	
</script>
</html>